package com.vero.appointment.controller;

import com.vero.appointment.util.EmailSender;
import com.vero.common.core.web.controller.BaseController;
import com.vero.common.core.web.domain.AjaxResult;
import com.vero.common.log.annotation.Log;
import com.vero.common.log.enums.BusinessType;
import com.vero.system.api.model.EmailVO;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/email")
public class EmailController extends BaseController
{

    /**
     * 发邮箱
     */
    @Log(title = "发邮箱", businessType = BusinessType.UPDATE)
    @PostMapping("send")
    public AjaxResult updateVaccineStock(@RequestBody EmailVO emailVO)
    {
        EmailSender.sendEmail(emailVO.getToEmail(), emailVO.getSubject(), emailVO.getContent());
        return toAjax(true);
    }

}
